import * as Router from 'koa-router';
import gameBegin from './controllers/gameBegin';
import gameOver from './controllers/gameOver';
import gameProgress from './controllers/gameProgress';
import programOne from './controllers/programOne';
import programTwo from './controllers/programTwo';
import programThree from './controllers/programThree';

// 定义此路由集合的初始地址，子路由为相对此地址的路径
const router = new Router({ prefix: '/hr' });

// url: http://localhost:6789/hr/game-begin
router.get('/game-begin', gameBegin);

// url: http://localhost:6789/hr/game-over
router.get('/game-over', gameOver);

// url: http://localhost:6789/hr/game-progress
router.get('/game-progress', gameProgress);

// demo url: http://localhost:6789/hr/program-one
router.post('/program-one', programOne);

// demo url: http://localhost:6789/hr/program-two
router.post('/program-two', programTwo);

// demo url: http://localhost:6789/hr/program-three
router.post('/program-three', programThree);

export default router;
